package main

import "fmt"

func main() {
	//切片追加元素
	var s1 []int
	s1 = append(s1, 1)
	s1 = append(s1, 2, 3)
	s1 = append(s1, 4, 5, 6)
	fmt.Println(s1)

	s2 := make([]int, 5)
	s2 = append(s2, 6)
	fmt.Println(s2)

	s3 := []int{1, 2, 3}
	s3 = append(s3, 4, 5)
	fmt.Println(s3)
}
